/***************************************************************************
 * C:\Programming\Projects\Slink\TestWebsite\ -- Copyright Bit Armory Labs 2007
 *
 * FILE:     Page2.aspx.cs, 19 code lines, [453 Bytes]
 * DATE:     8/26/2007 5:41 PM
 * MODIFIED: 9/2/2007 8:42 PM
 * PATH:     C:\Programming\Projects\Slink\TestWebsite
 *
 * NAMESPACE: 
 * CLASS:     Page2
 *
 * AUTHOR:   Brian Chavez (Cowboy), bchavez@bitarmory.com
 *
 ***************************************************************************/

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Page2 : System.Web.UI.Page 
{   
    /// <summary>
    /// Page load
    /// </summary>
    /// <param name="sender">Sender</param>
    /// <param name="e">E</param>
    protected void Page_Load(object sender, EventArgs e)
    {
        if ( User.IsInRole( "admin" ) )
        {
            Response.Redirect( "~/Page2.aspx" );
        }
        if( User.IsInRole( "employee" ) )
        {
            Response.Redirect( "~/CustomerPages/ViewCustomers.aspx" );
        }
        if( User.IsInRole("customer") )
        {
            Response.Redirect( "~/EmployeePages/ViewCatalog.aspx" );
        }
    }

    /// <summary>
    /// Page load
    /// </summary>
    /// <param name="sender">Sender</param>
    /// <param name="e">E</param>
    protected void Page_Load2( object sender, EventArgs e )
    {
        if( User.IsInRole( "admin" ) )
        {
            Response.Redirect( Slinks.Page2.TidleUrl );
        }
        if( User.IsInRole( "employee" ) )
        {
            Response.Redirect( Slinks.EmployeePages.ViewCustomers.TidleUrl );
        }
        if( User.IsInRole( "customer" ) )
        {
            Response.Redirect( Slinks.CustomerPages.ViewCatalog.TidleUrl );
        }
        
    }
}
